Automatic Watering System for Potted Plant

5727 Final Project
A Project By Jianyu Ni and Rui Chen.


Demonstration Video


Introduction

Automatic Watering Systems can water the plant routinely when the soil is dry. After every watering process, the pump will stop functioning for six hours, which is decided by the potted plants, in order to avoid overwatering. After selecting the plant,the main UI page will show the desired environment,which includes sunlight requirement, humidity and temperature, and the current data about humidity, temperature and water level. The buzzer will also be triggered to notify users when the temperature is out of range. Also, we have a camera to automatically record the plant's picture every day at noon.


Generic placeholder image

Project Objective:

  • It is impossible for people to water the plant on time all the time.
  • The commonly used soil dryness test which is finger test is tiring.
  • Overwatering the plant may cause disastrous outcomes.
  • It is hard to get numerical data about environment around the plant.

Design and Testing

The Automatic Watering System has two main parts: Sensors input and UI.
In terms of a bunch of sensors, we have SHT 30 sensor, soil moisture sensor,water level sensor,buzzer and camera. The connection between sensors and raspberry Pi will be shown in the drawing section. GPIO nodes will be used for controlling all the components.The whole process was straightforward with the help of the data sheet and several introduction videos, which included in the reference section.The SHT 30 will monitor the humidity and temperature and the buzzer will be triggered when the monitored temperature is out of the range we set for plant. The SHT 30 works really well with limited inaccuracy. However, we met small challenges when we wanted to use the buzzer. The test code does not function because we did not set up an appropriate frequency. After we tested out several frequencies, we chose the most suitable to notify the users in 10 meters away.The camera will take photos of plants everyday at noon and stored in a separate folder. This process is really straightforward, we just need to set up the crontab the run the shell script of the pi camera every day at noon.
When it comes to the UI page.We have two versions of the main UI page. At the very beginning, we splitted the page equally into three sections. The left side of the page visually shows the remaining water in the water container. When the water level is below the limit we set, the left side bottle will become red to notify the users to add more water. The middle page shows the picture of the plants and the switch plant button below, which allows the user to switch the plant. The right side of the page will show the desired and current environment data. However, the water level sensor can only tell the presence of water, so we cannot achieve the initial plan to visually get to know the water level in the container. Therefore, The left side shows the desired environment and the right side shows the current environment data and whether to add water to the container or not. Furthermore, we designed the initial start page,the plant selection page, and plant information page. The initial start page just shows the name of the project and the start button to start the program.After user clicks on the start button, it goes to the plant selection page, which allows the user to select the page in our database. After clicking on the name of the plant, it goes to the plant information page which shows the picture of the plant and brief information about the plant. We also have a ‘back’ button to return back to the plant selection page and a ‘confirm’ button to go to the main UI page. We spent a lot of time on the UI main page because we have to test out the font, color, location of the section, etc, in order to better design the main UI page. The whole process is time consuming but straightforward.
Generic placeholder image Generic placeholder image Generic placeholder image
Finally, we set up the crontab to run the program everytime we reboot the raspberry pi. So users can directly use the system when plugging in the power supply.


Drawings

Generic placeholder image

Note that there should be resistors between GPIOs and sensors, buzzer and relay (Blue lines). The soil moisture sensor should be insert into the soil by around 1 inch, and the water pipe should connect to a dripper and the dripper should be inserted into the soil by 2 inches. The water level sensor should be installed on the side of the water container. The pump should be placed on the bottom of the water container.

Future Work

At this time,We have five plants in our database, and users have to manually add plant information like desired environment requirements, brief introduction,plant’s pictures,etc to the json file.In the future, we want user can directly type the plant name to the system, and we can automatically get the data from the Internet and import into the database. Besides, we want to add a spectrometer to the system to better monitor the plant’s health. Finally, we are using the raspberry power for the pump which is relatively too low for the pump. In the future, the pump will be connected to the external power supply which works much better for larger potted plants.


Result

Everything performs as planned. We successfully followed the milestones set at the beginning. The only thing we did not achieve is that the water level sensor can only tell the presence of the water instead of the numerical data of the water level.Therefore, the sensor can only notify the users only when the water level is below the water level sensor.


Work Distribution

Generic placeholder image

Project group picture

Generic placeholder image

Jianyu Ni

jn482@cornell.edu

Designed the main UI page,Finished the Jason file for plant information input, tested out sensors and construct the circuit, Assembly work.

Generic placeholder image

Rui Chen

rc756@cornell.edu

Designed and coded the whole workflow of different UI pages, Connect sensors to GPIO, tested out sensors and construct the circuit.


Parts List

Total: $62.38


References

PiCamera Document
Liquid Water Sensor
SHT30
Pygame
R-Pi GPIO Document
mini pump&soil moisture sensor
Moisture Sensor
MH sensor Series

Code Appendix

https://github.com/rc756/automatic_watering_system